<?php
declare(strict_types=1);

use Phinx\Migration\AbstractMigration;

final class AddColumnStatusInMessageTable extends AbstractMigration
{
    public function up()
    {
        $this->table('message')
            ->addColumn('status', 'enum', ['values' => 'send_out, revoke', 'default' => 'send_out',  'comment' => '消息状态'])
            ->save();
    }

    public function down()
    {
        $this->table('message')
            ->removeColumn('status')
            ->save();
    }
}
